# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo4.26
# Description:
# Author:       $赵怡蕾
# Date:         2019/1/29
#-------------------------------------------------------------------------------

s = ["Bill","Mike","John"]
s[-1] = "Mary"                # 修改列表最后一个元素值
print(s)                      # 运行结果：['Bill', 'Mike', 'Mary']
s[3] = "Peter"                # 索引3超出了列表s的索引范围（-3到2），抛出异常
s[-3] = "蜘蛛侠"              # 索引-3是列表s的第1个元素，相当于s[0]
print(s)                      # 运行结果：['蜘蛛侠', 'Mike', 'Mary']
s[-4] = "钢铁侠"              # 索引-4超出了列表s的索引范围，抛出异常